package com.briup.day05;

public class Test_Reload {
    public static void main(String[] args) {
        int sum1 = sum(10, 20);
        System.out.println(sum1);
        double sum2 = sum(10.5, 20.5);
        System.out.println(sum2);
        int sum3 = sum(10, 20, 30);
        System.out.println(sum3);
        int max=Test_Function.getMax(10,20);
        System.out.println(max);
    }

    //同一个类中定义多个方法
    //方法的形参数据类型不一致或个数不一致
    //重载和方法返回值无关
    public static int sum(int a, int b) {
        return a + b;
    }

    public static double sum(double a, double b) {
        return a + b;
    }

    public static int sum(int a, int b, int c) {
        return a + b + c;
    }
}
